package com.black.app.domain.req.exercise.query;

import cn.hutool.core.util.StrUtil;
import com.black.common.core.domain.page.PageAbstructReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@ApiModel(value = "AppExerciseSeriesQueryReq", description = "查询锻炼系列请求参数")
@Data
public class AppExerciseSeriesQueryReq extends PageAbstructReq {

    @ApiModelProperty(value = "锻炼类型id")
    private String typeId;

    @ApiModelProperty(value = "锻炼系列名称")
    private String seriesTitle;

    @ApiModelProperty(hidden = true)
    @Override
    public String getOrderBy() {
        if (StrUtil.isNotBlank(super.getOrderByColumn())) {
            return super.getOrderByColumn() + " " + super.getIsAsc();
        }
        return null;
    }
}
